/**
 * 表单域
 *
 * @Author: Shann
 * @LastEditors: Shann
 * @Date: 2021-07-26 08:53:33
 * @LastEditTime: 2021-08-05 14:03:05
 * @FilePath: \angular-js-for-bootstrap\src\Essa\FormItem\FormItem.js
 * @Copyright: Copyright 2021-2021, all rights reserved. Essa.cn
 */
class FormItem {
    props = {
        label: String,
        labelCol: Object,
        wrapperCol: Object,
    };
    state = {
        labelClass: null,
        wrapperClass: null
    };
    constructor() {
        if (this.props.labelCol) {
            let labelClass = ["col-md-" + this.props.labelCol.span];
            this.state.labelClass = labelClass.join(" ");
        }
        if (this.props.wrapperCol) {
            let wrapperClass = ["col-md-" + this.props.wrapperCol.span];
            this.state.wrapperClass = wrapperClass.join(" ");
        }
    }
}
